home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / autose1g / frmmessa.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-06-24  |  4.8 KB  |  154 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMessageConsole 
  3.    BackColor       =   &H00404040&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "MessageConsole"
  6.    ClientHeight    =   3030
  7.    ClientLeft      =   1440
  8.    ClientTop       =   1260
  9.    ClientWidth     =   6885
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    PaletteMode     =   1  'UseZOrder
  15.    ScaleHeight     =   3030
  16.    ScaleWidth      =   6885
  17.    ShowInTaskbar   =   0   'False
  18.    Begin VB.Frame fraExitMessage 
  19.       BackColor       =   &H00404040&
  20.       Height          =   750
  21.       Left            =   4350
  22.       TabIndex        =   4
  23.       Top             =   1875
  24.       Width           =   1710
  25.       Begin VB.CommandButton cmdExitMessage 
  26.          Cancel          =   -1  'True
  27.          Caption         =   "E&xit"
  28.          Height          =   330
  29.          Left            =   285
  30.          TabIndex        =   5
  31.          Top             =   255
  32.          Width           =   1200
  33.       End
  34.    End
  35.    Begin VB.Frame Frame1 
  36.       BackColor       =   &H00404040&
  37.       Height          =   750
  38.       Left            =   750
  39.       TabIndex        =   1
  40.       Top             =   1875
  41.       Width           =   3240
  42.       Begin VB.CommandButton cmdSend 
  43.          Caption         =   "&Send"
  44.          Enabled         =   0   'False
  45.          Height          =   330
  46.          Left            =   1695
  47.          TabIndex        =   3
  48.          Top             =   255
  49.          Width           =   1200
  50.       End
  51.       Begin VB.CommandButton cmdEnterMessage 
  52.          Caption         =   "&Enter Message"
  53.          Height          =   330
  54.          Left            =   165
  55.          TabIndex        =   2
  56.          Top             =   255
  57.          Width           =   1335
  58.       End
  59.    End
  60.    Begin VB.TextBox txtMessageBox 
  61.       BackColor       =   &H00000000&
  62.       BeginProperty Font 
  63.          Name            =   "MS Sans Serif"
  64.          Size            =   9.75
  65.          Charset         =   0
  66.          Weight          =   700
  67.          Underline       =   0   'False
  68.          Italic          =   0   'False
  69.          Strikethrough   =   0   'False
  70.       EndProperty
  71.       ForeColor       =   &H0000FF00&
  72.       Height          =   1380
  73.       Left            =   600
  74.       MultiLine       =   -1  'True
  75.       ScrollBars      =   2  'Vertical
  76.       TabIndex        =   0
  77.       Top             =   405
  78.       Width           =   5655
  79.    End
  80.    Begin VB.Image Image4 
  81.       Height          =   225
  82.       Left            =   255
  83.       Picture         =   "FRMMESSA.frx":0000
  84.       Stretch         =   -1  'True
  85.       Top             =   15
  86.       Width           =   6375
  87.    End
  88.    Begin VB.Image Image3 
  89.       Height          =   225
  90.       Left            =   255
  91.       Picture         =   "FRMMESSA.frx":42D2
  92.       Stretch         =   -1  'True
  93.       Top             =   2805
  94.       Width           =   6375
  95.    End
  96.    Begin VB.Image Image2 
  97.       Height          =   3030
  98.       Left            =   6645
  99.       Picture         =   "FRMMESSA.frx":85A4
  100.       Stretch         =   -1  'True
  101.       Top             =   15
  102.       Width           =   225
  103.    End
  104.    Begin VB.Image Image1 
  105.       Height          =   3030
  106.       Left            =   0
  107.       Picture         =   "FRMMESSA.frx":BEC6
  108.       Stretch         =   -1  'True
  109.       Top             =   0
  110.       Width           =   240
  111.    End
  112. Attribute VB_Name = "frmMessageConsole"
  113. Attribute VB_GlobalNameSpace = False
  114. Attribute VB_Creatable = False
  115. Attribute VB_PredeclaredId = True
  116. Attribute VB_Exposed = False
  117. Option Explicit
  118. Private Sub cmdEnterMessage_Click()
  119. 'unlock the text box to allow typing
  120. txtMessageBox.Locked = False
  121. 'clear the text box for typing
  122. txtMessageBox.Text = ""
  123. 'enable the "send" button
  124. cmdSend.Enabled = True
  125. cmdSend.Default = True
  126. 'move the focus to the textbox
  127. txtMessageBox.SetFocus
  128. End Sub
  129. Private Sub cmdExitMessage_Click()
  130. PlaySoundEffect "Button3"
  131. 'get rid of 'incoming message'
  132. frmGameScreen.txtMessages.FontBold = False
  133. frmGameScreen.txtMessages.ForeColor = vbGreen
  134. frmGameScreen.txtMessages.Text = "No New Messages..."
  135. Unload frmMessageConsole
  136. End Sub
  137. Private Sub cmdSend_Click()
  138. PlaySoundEffect "Button4"
  139. 'Finished typing message - save as OutgoingMessage
  140. OutgoingMessage = txtMessageBox.Text
  141. 'get rid of 'incoming message'
  142. frmGameScreen.txtMessages.FontBold = False
  143. frmGameScreen.txtMessages.ForeColor = vbGreen
  144. frmGameScreen.txtMessages.Text = "*Message Sent*"
  145. frmGameScreen.tmrUpdateMessageBox.Enabled = True
  146. 'unload the form
  147. Unload frmMessageConsole
  148. End Sub
  149. Private Sub Form_Load()
  150. txtMessageBox.Text = IncomingMessage
  151. 'lock the text box to prevent alteration of text
  152. txtMessageBox.Locked = True
  153. End Sub
  154.